
package com.rt.schedulenew.service.impl;


import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.rt.schedulebase.entity.ExamReferItem;
import com.rt.schedulebase.mapper.ExamReferItemMapper;
import com.rt.schedulenew.api.IExamReferItemService;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class ExamReferItemServiceImpl extends ServiceImpl<ExamReferItemMapper, ExamReferItem> implements IExamReferItemService {

    @Override
    public int insert(ExamReferItem entity) {
        return baseMapper.insert(entity);
    }

    @Override
    public int delete(ExamReferItem entity) {
        Map<String, Object> map = new HashMap<>();
        map.put("APPLY_ID", entity.getApplyId());
        UpdateWrapper<ExamReferItem> del = new UpdateWrapper<>();
        del.allEq(map, false);
        return baseMapper.delete(del);
    }
}
